#检验id
def idcheck(id):
    if len(id) > 8:
        return 0
    for p in id:
        if(not(p == "_") and not(p.isnumeric()) and not(ord("A")<= ord(p) <= ord("z"))):
            return 0
    return 1
while 1:
    id = input("请输入ID：  ")
    if(idcheck(id)):
        break;
    else:
        print("请输入正确的id")
#检验邮箱
def emailcheck(email):
    for p in email:
        if p == "@":
            return 1
    return 0
while 1:
    email = input("请输入邮箱：  ")
    if(emailcheck(email)):
        break;
    else:
        print("请输入正确的邮箱")
#检验身份证号
def cardIdcheck(n):
    if len(n) != 18:
        return 0 
    n = str(n)
    if int(n[16])%2==0:
      return 2
    else:
      
      return 1
while 1:
    cardId = input("请输入身份证号：  ")
    if(cardIdcheck(cardId)):
        if(cardIdcheck(cardId)==2):
            gender="女"
        else:
            gender="男"
        break;
    else:
        print("请输入正确的身份证号")

#检验姓名
def namecheck(name):
    if len(name) > 4 or  u'\u4e00' >= name or name >= u'\u9fff':
        return 0
    else:
        return 1
while 1:
    name = input("请输入姓名：  ")
    if(namecheck(name)):
        break;
    else:
        print("请输入正确的姓名")

print("id:{}\t 姓名：{}\t 性别:{}\n邮箱;{}\t身份证号：{}\n".format(id,name,gender,email,cardId))
